<template>
  <div class="myOrderDC">
    <div class='dd-column'>
      <div class='statusTitle dd-row dd-center' :style="detailsData.status==2.5 ? 'color:#aaa' : ''">{{detailsData.status | SCodeToStr}}</div>
      <div class=''>
        <div class="timeAndId dd-row dd-h-2side">
          <!-- 时间戳 -->
          <div class='dataTime'>{{ detailsData.timeStamp | getDatee }}</div>
          <!-- 编号 -->
          <div class='status'>{{ detailsData.id}}</div>
        </div>

        <div class='title2'>
          <span class='dd-c_o'>| </span> 商品明细
        </div>
        <div class=" dd-row dd-h-2side dd-v-center orderItem" v-for="(item2,index2) in detailsData.goods" :key="index2">
          <GoodsItem :item2="item2" />
        </div>
      </div>

      <div class='item' v-for="(item,index) in detailsData.goodsTAndList" :key="index">
        <!--  折扣 积分信息  -->
        <div class="dd-row dd-h-2side">
          <div v-if="item.title">{{item.title}}</div>
          <div>
            <span v-if="item.message">{{item.message}}</span>
          </div>
        </div>
      </div>
      <div class='item'>
        <!--  总计  -->
        <div class="dd-row dd-h-2side">
          <div>实付</div>
          <div>
            <span>￥ {{detailsData.totalMoney}}</span>
          </div>
        </div>
      </div>

    </div>
  </div>
</template>

<script>
import { timeStampToDate, SCodeToStr } from "@/utils/ddUtils.js";
import GoodsItem from "@/components/My/GoodsItem";
export default {
  props: ["detailsData"],
  data() {
    return {};
  },
  filters: {
    SCodeToStr(_status) {
      return SCodeToStr(_status);
    },
    //   时间戳转换函数
    getDatee(_timeStamp) {
      return timeStampToDate(_timeStamp);
    }
  },
  components: {
    GoodsItem
  }
};
</script>

<style scoped>
/* 订单时间和编号 */
.timeAndId {
  font-size: 10pt;
  font-weight: bold;
  background-color: #f1f1f1;
  padding: 5pt 2pt;
}

.myOrderDC {
  background-color: #fff;
  margin-bottom: 10pt;
}

/*标题  */

.statusTitle {
  margin: 12pt 0;
  font-size: 12pt;
  font-weight: bold;
}

.title2 {
  font-size: 11pt;
  font-weight: bold;
  margin: 5pt 2pt;
}

.item {
  font-size: 10pt;
  padding: 8pt 10pt;
}

.money {
  font-weight: blod;
}

/*立即支付  */

.topay {
  margin-top: 20pt;
}

/*取消订单  */

.cancelPay {
  margin: 10pt;
  font-size: 10pt;
}

/*  */
.orderItem {
  padding: 0pt 10pt;
}

/* 已评价  */
.item .have-evaluation {
  margin-top: 20pt;
  font-size: 12pt;
  font-weight: bold;
}

/* 已付款 没取货时候的取货码  */

/* 分割线  */
.forPickup {
}
/* 取餐码 三个字  */
.forPickup .takeFood {
  font-size: 10pt;
}
/* 取餐码 数字  */
.forPickup .takeFoodCode {
  font-size: 14pt;
  font-weight: bold;
}
/* 超时提示  */
.forPickup .takeFoodTip {
  font-size: 8pt;
  color: #444;
}
/* 底部  */
.forPickup .dd-fixed-bottom {
  font-size: 10pt;
  font-weight: normal;
  bottom: 10pt;
  color: #444;
}
/* 底部分割线  */
.forPickup .dd-fixed-bottom .divider {
  margin: 0 5pt;
}

/* 4 已完成 已评论 的评价内容  */
.evaluation {
  padding: 10pt;
}
.evaluation .t {
  font-size: 14pt;
}
.evaluation .c {
  font-size: 12pt;
  font-weight: normal;
}
</style>
